<template>
  <!-- 登入输入框架 -->
  <div class="loginInput">
    <div class="loginInput-textLbael">{{ STYLE_name }}</div>
    <div class="loginInput-spanx">
      <div class="loginInput-spanx-box">
        <a-input v-model="userData.userId" placeholder="请输入账号" allow-clear>
          <template #prefix>
            <img class="loginInput-spanx-box-inputIcon" src="@img/loginInput/admin.png" />
          </template>
        </a-input>
        <div class="loginInput-spanx-box-line"></div>
        <a-input-password v-model="userData.password" placeholder="请输入密码" allow-clear>
          <template #prefix>
            <img class="loginInput-spanx-box-inputIcon" src="@img/loginInput/password.png" />
          </template>
        </a-input-password>
      </div>
      <div class="loginInput-spanx-buttomppm">
        <a-button class="loginInput-spanx-buttomppm-buttomleft" type="primary" long :loading="loginLD" @click="login">登入</a-button>
        <a-button class="loginInput-spanx-buttomppm-buttomright" type="primary" status="warning" long>注册</a-button>
      </div>
      <div class="loginInput-spanx-tiplabel">
        <a-button type="text" size="mini">忘记密码?</a-button>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { toRefs } from 'vue';
import importConfig from './loginInput';
export default {
  setup() {
    const { base, login } = importConfig();
    return {
      ...toRefs(base),
      login,
    };
  },
};
</script>

<style lang="less" scoped>
.loginInput {
  width: 360px;
  margin: auto;
  &-spanx {
    padding: 10px;
    box-shadow: 1px 3px 6px rgb(55, 97, 136);
    border-radius: 10px;
    &-box {
      &-inputIcon {
        width: 16px;
      }
      &-line {
        padding: 2px;
      }
    }
    &-buttomppm {
      // padding: 10px;
      margin-top: 10px;
      display: flex;
      // align-content: space-around;
      align-content: space-between;
      justify-content: space-between;
      &-buttomleft {
        width: 60%;
      }
      &-buttomright {
        width: 35%;
      }
    }
    &-tiplabel {
      margin-top: 5px;
      display: flex;
      justify-content: flex-end;
    }
  }
  &-textLbael {
    text-align: center;
    font-weight: 900;
    color: black;
    font-size: 32px;
    height: 60px;
  }
}
</style>
